<template>
  <view class="container" :style="{height: windowHeightType + 'px'}">
    <image src="https://447331-dev-1256206693.cos.ap-beijing.myqcloud.com/static/img/beijing.png" mode="aspectFill"></image>
    <button @click="Scantype">立即识别</button>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        windowHeightType: 0
      };
    },
	//发送给朋友
	onShareAppMessage: function() {
		return {
			title: "扫一扫识别宠物-奇宠日记",
      imageUrl: "http://dev-1256206693.cos.ap-beijing.myqcloud.com/upload/20210105/1baeee01a05a273297c65145c2b6398b.jpg"
		};
	},
	//分享到朋友圈
	onShareTimeline: function() {
		return {
			title: "扫一扫识别宠物-奇宠日记",
			imageUrl: "http://dev-1256206693.cos.ap-beijing.myqcloud.com/upload/20210105/1baeee01a05a273297c65145c2b6398b.jpg"
		};
	},
    methods: {
      Scantype() {
        uni.report('PetIdentification', '宠物识别');
        uni.navigateTo({
          url: "/subpkg/Petscan/Petscan"
        })
      }
    },
    onLoad() {
      // 获取当前系统的信息
      const sysInfo = uni.getSystemInfoSync()
      
      this.windowHeightType = sysInfo.windowHeight
      // console.log(this.windowHeightType)
    }
  }
</script>

<style lang="scss">
  .container {
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 30px;

    image {
      width: 100%;
      height: 100%;
    }

    button {
      position: absolute;
      bottom: 74rpx;
      background-color: transparent;
      border: 1px solid #fff;
      width: 702rpx;
      height: 98rpx;
      border-radius: 98rpx;
      line-height: 98rpx;
      color: #fff;
    }
  }
</style>
